package cn.lili.controller.order;


import cn.lili.common.aop.annotation.PreventDuplicateSubmissions;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.order.order.entity.vo.DistributionAndGrowAwardVO;
import cn.lili.modules.order.order.entity.dos.RankingGrowAwardStatus;
import cn.lili.modules.order.order.entity.dto.RankingDistributionDTO;
import cn.lili.modules.order.order.service.IRankingGrowAwardStatusService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 成长奖励奖品领取明细 前端控制器
 * </p>
 *
 * @author zhushiqing
 * @since 2023-12-21
 */
@AllArgsConstructor
@RestController
@RequestMapping("/order/rankingGrowAwardStatus")
public class RankingGrowAwardStatusController {

    IRankingGrowAwardStatusService rankingGrowAwardStatusService;

    /**
     * 领取奖励记录列表
     *
     * @return 领取奖励记录列表
     */
    @GetMapping("/page")
    public ResultMessage<Object> statusPage(RankingGrowAwardStatus rankingGrowAwardStatus, PageVO page) {
        return rankingGrowAwardStatusService.statusPage(rankingGrowAwardStatus, page);
    }


    @GetMapping("/getRankingGrowAwardStatusList")
    @ApiOperation("分页获取-成长列表-用户明细展示")
    public ResultMessage<Page<DistributionAndGrowAwardVO>> getRankingGrowAwardStatusList(RankingDistributionDTO dto) {
        return rankingGrowAwardStatusService.getRankingGrowAwardStatusList(dto);
    }
    @PostMapping("/addExpressNoToGrowAward")
    @ApiOperation("给成长奖励奖品填写物流信息")
    @PreventDuplicateSubmissions
    public ResultMessage<Object> addExpressNoToGrowAward(@RequestBody RankingGrowAwardStatus growAwardStatus) {
        return rankingGrowAwardStatusService.addExpressNoToGrowAward(growAwardStatus);
    }

}
